﻿using System.Collections.Generic;

using Spectro.Cards;

namespace Spectro.Web.Models
{
    public class ArenaModel
    {
        private readonly Gamer owner;

        private readonly Gamer rival;

        /// <summary>
        /// Initializes a new instance of the <see cref="ArenaModel"/> class.
        /// </summary>
        /// <param name="owner">The owner.</param>
        /// <param name="rival">The rival.</param>
        public ArenaModel(Gamer owner, Gamer rival)
        {
            this.owner = owner;
            this.rival = rival;
        }

        /// <summary>
        /// Gets the owner wariors.
        /// </summary>
        public IEnumerable<IEssence> OwnerWariors
        { 
            get
            {
                return this.owner.Wariors;
            }
        }

        /// <summary>
        /// Gets the rival wariors.
        /// </summary>
        public IEnumerable<IEssence> RivalWariors
        {
            get
            {
                return this.rival.Wariors;
            }
        }

        /// <summary>
        /// Gets or sets the cards.
        /// </summary>
        /// <value>
        /// The cards.
        /// </value>
        public IEnumerable<ICard> Cards { get; set; }

        /// <summary>
        /// Gets the owner power.
        /// </summary>
        public MagicPower OwnerPower
        {
            get
            {
                return this.owner.Power;
            }
        }

        /// <summary>
        /// Gets the rival power.
        /// </summary>
        public MagicPower RivalPower
        {
            get
            {
                return this.rival.Power;
            }
        }
    }
}